package service.Impl;

import service.Observer;

public class AlarmSystem implements Observer {
    @Override
    public void update(int temperature) {
        if (temperature > 42) {
            System.out.println("警报：温度超过阈值！");
        }else {
            System.out.println("温度正常！");
        }
    }
}
